'use client';
import { usePathname, useSearchParams } from 'next/navigation';
import { FC, useEffect } from 'react';

type DetailProps = {
	params: {
		lng: string;
		categoryId: string;
	};
};

// #----------- 上: ts类型定义 ----------- 分割线 ----------- 下: JS代码 -----------

const Detail: FC<DetailProps> = ({ params }) => {
	const pathname = usePathname();
	const searchParams = useSearchParams();
	useEffect(() => {
		console.log(params, '---', pathname);
	}, [params, pathname]);

	return <div>ID:{params.categoryId}</div>;
};

export default Detail;
